<!DOCTYPE html>
<html lang="fr" xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="{{ constant('DEFAULT_ENCODING') }}" />
        <meta name="description" content="{{ constant('Strings::LABEL_0000') }}" />
        <title>{{ constant('Strings::LABEL_0001') }}</title>   
        <link type="text/css" href="{{ constant('PATH_CSS') }}ui/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
        <link type="text/css" href="{{ constant('PATH_CSS') }}sirh-consulting.css" rel="stylesheet" />
        <script type="text/javascript" src="{{ constant('PATH_JS') }}jquery-1.7.2.min.js"></script>
        <script type="text/javascript" src="{{ constant('PATH_JS') }}jquery-ui-1.8.20.custom.min.js"></script>
        <script type="text/javascript" src="{{ constant('PATH_JS') }}toolkit.js"></script>
        {% for stylesheet in stylesheets %}
            <link type="text/css" rel="stylesheet" href="{{ [constant('PATH_CSS'), stylesheet]|join }}" />
        {% endfor %}
        {% for javascript in javascripts %}
            <script type="text/javascript" src="{{ [constant('PATH_JS'), javascript]|join }}"></script>
        {% endfor %}
        {% block extra_scripts %}
        {% endblock %}
        <script type="text/javascript">

            $(document).ready(function () {

                $('button').button();

                // hover states on the static widgets
                $('#dialog_link, ul#icons li').hover(
                        function () {
                            $(this).addClass('ui-state-hover');
                        },
                        function () {
                            $(this).removeClass('ui-state-hover');
                        }
                );

                stop_load_img();
            });

            function stop_load_img() {
                $('#loader').hide();
            }

            function load_img() {
                $('#loader').show();
            }
        </script>
    </head>
    <body>
        <div id="loader"></div>
        {% if exception is defined %}
            <div id="dialog_exception" title="{{ constant('Strings::LABEL_0012') }}">
                <div class="ui-widget">
                    <div class="ui-state-error ui-corner-all" style="padding:16px;font-size:1.1em;line-height:2em;">
                        <span class="helper"></span>
                        <div class="ui-icon ui-icon-alert" style="display:inline-block;margin-right:.3em;vertical-align:text-bottom;"></div>
                        {{ exception.getMessage() }}
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                $('#dialog_exception').dialog({
                    autoOpen: true, width: 600, modal: true, resizable: false, draggable: false,
                    buttons: {
                        Ok: function () {
                            $(this).dialog('close');
                        }
                    }
                });
            </script>
        {% endif %}
        <div id="header">
            {% block header %}
            {% endblock %}
            <div id="logo">
                <img src="{{ [constant('PATH_IMG'), constant('Images::IMG_HEADER')]|join }}">
            </div>
        </div>
        {% block content %}
            {% include('forms/login.twig') %}
        {% endblock %}
        {% block footer %}
            {% include('footer.twig') %}
        {% endblock %}
    </body>
</html>